Programmable calculator including separate line numbering means for user-definable functions

ABSTRACT

An adaptable programmable calculator is provided by employing a modular read-write and read-only memory unit capable of being expanded to provide the calculator with additional program and data storage functions oriented towards the environment of the user, a central processing unit capable of performing both serial binary and parallel binary-coded-decimal arithmetic, and an input-output control unit capable of bidirectionally transferring information between the memory or central processing units and a number of input and output units, such as a keyboard and an output display unit. The memory, central processor, and input-output control units are controlled by a microprocessor included in the central processing unit. Functions and subroutines that are defined by the user, stored in the calculator memory, and associated with definable keys of the keyboard are each automatically assigned a sequence of line numbers that is independent of the sequence of line numbers assigned to any other function, subroutine, or mainline program stored in the calculator memory. Such defined functions and subroutines defined by the user and stored in the calculator memory may be selectively erased from memory without thereby altering a mainline program or other functions or subroutines stored therein.

CROSS REFERENCE to RELATED APPLICATION

This is a division of application Ser.. No. 510,921, filed on Sept. 30,1974, now U.S. Pat. No. 4,028,538, which is in turn a division ofapplication Ser. No. 212,581, filed on Dec. 27, 1971, now issued as U.S.Pat. No. 3,839,630. The subject matter of U.S. Pat. No. 3,839,630 isincorporated herein by reference.

BACKGROUND OF THE INVENTION

This invention relates generally to calculators and improvements thereinand more particularly to programmable calculators that may be controlledboth manually from the keyboard input unit and automatically by a storedprogram loaded into the calculator from the keyboard input unit or anexternal record member.

Computational problems may be solved manually, with the aid of acalculator (a dedicated computational keyboard-driven machine that maybe either programmable or nonprogrammable), or a general purposecomputer. Manual solution of computational problems is often very slow,so slow in many cases as to be an impractical, expensive, andineffective use of the human resource, particularly when there are otheralternatives for solution of the computational problems.

Nonprogrammable calculators may be employed to solve many relativelysimple computational problems more efficiently than they could be solvedby manual methods. However, the keyboard operations or language employedby these calculators is typically trivial in structure, therebyrequiring many keyboard operations to solve more general arithmeticproblems. Programmable calculators may be employed to solve manyadditional computational problems at rates hundreds of times faster thanmanual methods. However, the keyboard language employed by thesecalculators is also typically relatively simple in structure, therebyagain requiring many keyboard operations to solve more generalarithmetic problems.

Another basic problem with nearly all of the keyboard languages employedby conventional programmable and nonprogrammable calculators is thatthey allow the characteristics of the hardware of the calculator to showthrough to the user. Thus, the user must generally work with datamovement at the hardware level, for example, by making sure that data isin certain storage registers before specifying the operations to beperformed with that data and by performing other such "housekeeping"functions.

SUMMARY OF THE INVENTION

The principal object of this invention is to provide an improvedprogrammable calculator that has more capability and flexibility thanconventional programmable calculators, that is smaller, less expensiveand more efficient in calculating elementary mathmematical functionsthan conventional computer systems, and that is easier to utilize thanconventional programmable calculators or computer systems.

Another object of this invention is to provide a programmable calculatoremploying a directly usable high-level keyboard language that completelyeliminates most of the operator "housekeeping" requirements typicallyassociated with the languages of conventional programmable calculatorsand computers.

Another object of this invention is to provide a programmable calculatorin which the user may define and store within the calculator additionalkeyboard functions to be performed by the calculator, may associate eachsuch defined keyboard function with a separate definable key of akeyboard input unit, and may cause each such defined keyboard functionto be executed and/or stored as part of a program, either by itself oras part of an arithmetic expression, by depressing an execute key or astore key, respectively of the keyboard input unit following depressionof the associated definable key and one or more other keys required toenter the parameters of the defined keyboard function into thecalculator.

Another object of this invention is to provide a programmable calculatorin which each subruoutine defined, stored within the calculator, andassociated with a separate definable key of a keyboard input unit by theuser is given a sequence of line numbers independent of the line numbersof any other function, subroutine, or program that may also be storedwithin the calculator.

These objects are accomplished according to the illustrated preferredembodiment of this invention by employing a keyboard input unit, amagnetic card reading and recording unit, a solid state output displayunit, an output printer unit, an input-output control unit, a memoryunit, and a central processing unit to provide an adaptable programmablecalculator having manual operating, automatic operating, programentering, magnetic card reading, magnetic card recording, and alphamericprinting modes. The keyboard input unit includes a group of data keysfor entering numeric data into the calculator, a group of control keysfor controlling the various modes and operations of the calculator andthe format of the output display, and a group of definable keys forcontrolling additional functions that may be added by the user. All ofthe data keys and nearly all of the control keys may also be employedfor programming the calculator, many of the control keys being providedsolely for this purpose.

The magnetic card reading and recording unit includes a reading andrecording head, a drive mechanism for driving a magnetic card from aninput receptacle in the front panel of the calculator housing past thereading and recording head to an output receptacle in the front panel,and reading and recording drive circuits coupled to the reading andrecording head for bidirectionally transferring information between themagnetic card and the calculator as determined by the control keys ofthe keyboard input unit. It also includes a pair of detectors and anassociated control circuit for disabling the recording drive circuitwhenever a notch is detected in the leading edge of the magnetic card toprevent information recorded on the magnetic card from beinginadvertently destroyed. Such a notch may be provided in any magneticcard the user desires to protect by simply pushing out a perforatedportion thereof.

The input printer unit includes a stationary thermal printing head witha row of resistive heating elements, a drive circuit for selectivelyenergizing each heating element, and a stepping mechanism for driving astrip of thermally-sensitive recording paper past the stationary thermalprinting head in seven steps for each line of alphameric information tobe printed out. Every alphabetic and numeric character and many othersymbols may be printed out individually or in messages as determined bythe control keys of the keyboard input unit or by a program storedwithin the calculator.

The input-output control unit includes a sixteen-bit universal shiftregister serving as an input-output register into which information maybe transferred serially from the central processing unit or in parallelfrom the keyboard input and magnetic card reading and recording unitsand from which information may be transferred serially to the centralprocessing unit or in parallel to the solid state output display,magnetic card reading and recording, and output printer units. It alsoincludes control logic responsive to the central processing unit forcontrolling the transfer of information between these units. Theinput-output control unit may also be employed to perform the samefunctions between the central processing unit and peripheral unitsincluding, for example, a digitizer, a marked card reader, an X-Yplotter, a magnetic tape unit, a disc, and a typewriter. A plurality ofperipheral units may be connected at the same time to the input-outputcontrol unit by simply plugging interface modules associated with theselected peripheral units into receptacles provided therefore in a rearpanel of the calculator housing.

The memory unit includes a modular random-access read-write memoryhaving a dedicated system area and a separate user area for storingprogram steps and/or data. The user portion of the read-write memory maybe expanded without increasing the overall dimensions of the calculatorby the addition of a program storage module. Additional read-writememory made available to the user is automatically accommodated by thecalculator, and the user is automatically informed when the storagecapacity of the read-write memory has been exceeded.

The memory unit also includes a modular read-only memory in whichroutines and subroutines of basic instructions for performing thevarious functions of the calculator are stored. These routines andsubroutines of the readonly memory may be expanded and adapted by theuser to perform additional functions oriented toward the specific needsof the user. This is accomplished by simply plugging additionalread-only memory modules into receptacles provided therefor in the toppanel of the calculator housing. Added read-only memory modules areautomatically accommodated by the calculator and may be associated withthe definable keys of the keyboard input unit or employed to expand theoperations associated with other keys. An overlay is employed with eachadded read-only memory module associated with the definable keys of thekeyboard input unit to identify the additional functions that may thenbe performed by the calculator.

Plug-in read-only memory modules include, for example, a trigonometricmodule, a peripheral control module, and a definable functions module.The trigonometric module enables the calculator to perform trigonometricfunctions, logarithmic functions, and many other mathematical functions.The definable functions module enables the user to store subprograms ofhis own choosing in the program storage section of the read-writememory, associate them with some of the definable keys of the keyboardinput unit, and protect them from subsequently being inadvertentlyaltered or destroyed. These subprograms may have their own linenumbering dequence and may be any of three types: an immediate executetype wherein the subprogram may be run upon depressing a DEFINE key; asubroutine utilizing parameters; a function having parameters that maybe employed as any other keyboard function.

The memory unit further includes a pair of recirculating sixteen-bitserial shift registers. One of these registers serves as a memoryaddress register for serially receiving information from anarithmetic-logic unit included in the central processing unit, forparallel addressing any memory location designated by the receivedinformation, and for serially transferring the received information backto the arithmetic-logic unit. The other of these registers serves as amemory access register for serially receiving information from thearithmetic-logic unit, for writing information in parallel into anyaddressed memory location, for reading information in parallel from anyaddressed memory location, and for serially transferring information tothe arithmetic logic unit. It also serves as a four-bit parallel shiftregister for transferring four bits of binary-coded-decimal informationin parallel to the arithmetic-logic unit.

The central processing unit includes four recirculating sixteen-bitserial shift registers, a four-bit serial shift register, the arithmeticlogic unit, a programmable clock, and a microprocessor. Two of thesesixteen-bit serial shift registers serve as accumulator registers forserially receiving information from and seriously transferringinformation to the arithmetic logic unit. The accumulator registeremployed is designated by a control flip-flop. One of the accumulatorregisters also serves as a four-bit parallel shift register forreceiving four bits of binary-coded-decimal information in parallel fromand transferring four bits of such information in parallel to thearithmetic logic unit. The two remaining sixteen-bit serial shiftregisters serve as a program counter register and a qualifier register,respectively. They are also employed for serially receiving informationfrom and serially transferring information to the arithmetic-logic unit.The four-bit serial shift register serves as an extend register forserially receiving information from either the memory access register orthe arithmetic-logic unit and for serially transferring information tothe arithmetic-logic unit.

The arithmetic-logic unit is employed for performing one-bit serialbinary arithmetic, four-bit parallel binary-coded-decimal arithmetic,and logic operations. It may also be controlled by the microprocessor toperform bidirectional direct and indirect arithmetic between any of aplurality of the working registers and any of the storage registers ofthe data storage section of the read-write memory.

The programmable clock is employed to supply a variable number of shiftclock pulses to the arithmetic logic unit and to the serial shiftregisters of the input-output, memory, and central processing units. Itis also employed to supply clock control signals to the input-outputcontrol logic and to the microprocessor.

The microprocessor includes a read-only memory in which a plurality ofmicroinstructions and codes are stored. These microinstructions andcodes are employed to perform the basic instructions of the calculator.They include a plurality of coded and non-coded microinstructions fortransferring control to the input-output control logic, for controllingthe addressing and accessing of the memory unit, and for controlling theoperation of the two accumulator registers, the program counterregister, the extend register and the arithmetic logic unit. They alsoinclude a plurality of clock codes for controlling the operation of theprogrammable clock, a plurality of qualifier selection codes forselecting qualifiers and serving as primary address codes for addressingthe read-only memory of the microprocessor, and a plurality of secondaryaddress codes for addressing the read-only memory of the microprocessor.In response to a control signal from a power supply provided for thecalculator, control signals for the programmable clock, and qualifiercontrol signals from the central processing and input-output controlunits, the microprocessor issues the microinstructions and codes storedin the read-only memory of the microprocessor as required to processeither binary or binary-coded-decimal information entered into or storedin the calculator.

In the keyboard mode, the calculator is controlled by keycodessequentially entered into the calculator from the keyboard input unit bythe user. The solid state output display unit displays either themnemonic representation of the keys as they are depressed or a numericrepresentation of output data or alphameric user instructions or programresults. The output printer unit may be controlled by the user toselectively print out a numeric representation of any numeric dataentered into the calculator from the keyboard input unit, a numericrepresentation of any result calculated by the calculator, or a programlisting on a line-by-line basis of the mnemonic representation of thekeys entered. The output printer unit may also be controlled by the userto print out labels for inputs to and outputs from the calculator andany other alphameric information that may be desired.

When the calculator is in the keyboard mode, it may also be operated ina trace alphameric printing mode. The output printer unit then printsout a mnemonic representation of each program line as it is entered bythe user.

In the program running mode, the calculator is controlled byautomatically obtaining compiled keycodes stored as steps of a programin the user storage section of the read-write memory. During automaticoperation of the calculator, data may be obtained from the memory unitas designated by the program or may be entered from the keyboard inputunit by the user while the operation of the calculator is stopped fordata either by the program or by the user.

When the calculator is in the program running mode, the user may alsoemploy a TRACE key to check the execution of the program line by line inorder to determine whether the program, as entered into the calculator,does in fact carry out the desired sequence of operations.

In the program entering mode, keycodes are sequentially entered by theuser into the calculator from the keyboard input unit and are compiledinto Polish notation and stored as steps of a program in the userstorage section of the read-write memory.

In the magnetic card reading mode, the magnetic card reading andrecording unit may be employed by the user to separately load eitherdata or programs into the calculator from one or more external magneticcards.

In the magnetic card recording mode, the magnetic card reading andrecording unit may be employed by the user to separately record eitherdata or programs stored in the user section of the read-write memoryonto one or more external magnetic cards. Programs may be coded by theuser as being secure when they are recorded onto one or more externalmagnetic cards. The calculator detects such programs when they arereloaded into the calculator and prevents the user from re-recordingthem or obtaining any listing or other indication of the individualprogram steps.

DESCRIPTION OF THE DRAWINGS

The following figures have been numbered in correspondence with the samefigures of U.S. Pat. No. 3,839,630, cited above as being incorporatedherein by reference.

FIG. 1 is a front perspective view of an adaptable programmablecalculator according to the preferred embodiment of this invention.

FIGS. 3A-B are a simplified block diagram of the adaptable programmablecalculator of FIGS. 1 and 2.

FIG. 7 is a plan view of the keyboard input unit employed in theadaptable programmable calculator of FIGS. 1 and 3A-B showing how thekeyboard input unit may be redefined by an alpha plug-in read-onlymemory module that may also be employed in the adaptable programmablecalculator.

FIGS. 10A-E are perspective views of the user-definable functionsplug-in read-only memory module that may be employed in the adaptableprogrammable calculator and plan views of the keyboard overlaysassociated therewith.

DESCRIPTION OF THE PREFERRED EMBODIMENT GENERAL DESCRIPTION

Referring to FIG. 1, there is shown an adaptable programmable calculator10 including both a keyboard input unit 12 for entering information intoand controlling the operation of the calculator and a magnetic cardreading and recording unit 14 for recording information stored withinthe calculator onto one or more external magnetic cards 16 and forsubsequently loading the information recorded on these and other similarmagnetic cards back into the calculator. The calculator also includes asolid state output display unit 18 for displaying alphameric informationstored within the calculator. It may also include an output printer unit20 for printing out alphameric information on a strip ofthermally-sensitive recording paper 22. All of these input and outputunits are mounted within a single calculator housing 24 adjacent to acurved front panel 26 thereof.

Referring to the simplified block diagram shown in FIGS. 3A-B, it may beseen that the calculator also includes an input-output control unit 44(hereinafter referred to as the I/O control unit) for controlling thetransfer of information to and from the input and output units, a memoryunit 46 for storing and manipulating information entered into thecalculator and for storing routines and subroutines of basicinstructions performed by the calculator, and a central processing unit48 (hereinafter referred to as the CPU) for controlling the execution ofthe routines and subroutines of basic instructions stored in the memoryunit as required to process information entered into or stored withinthe calculator. The calculator also includes a bus system comprising anS-bus 50, a T-bus 52, and an R-bus 54 for transferring information fromthe memory and I/O control units to the CPU, from the CPU to the memoryand I/O control units, and between different portions of the CPU. Itfurther comprises a power supply for supplying DC power to thecalculator and peripheral units employed therewith and for issuing acontrol signal POP when power is supplied to the calculator.

The I/O control unit 44 includes an input-output register 56(hereinafter referred to as the I/O register), associated I/O gatingcontrol circuitry 58, and input-output control logic 60 (hereinafterreferred to as the I/O control). I/O register 56 comprises a universalsixteen-bit shift register into which information may be transferredeither bit-serially from CPU 48 via T-bus 52 or in parallel fromkeyboard input unit 12, magnetic card reading and recording unit 14, andperipheral input units 28 such as the marked card reader via twelveinput party lines 62. Information may also be transferred from I/Oregister 56 either bit-serially to CPU 48 via S-bus 50 or in parallel tomagnetic card reading and recording unit 14, solid state output displayunit 18, output printer unit 20, and peripheral output units 28 such asthe X-Y plotter or the typewriter via sixteen output party lines 64.

I/O gating control circuitry 58 includes control circuits forcontrolling the transfer of information into and out of I/O register 56in response to selected I/O qualifier control signals from CPU 48 andselected I/O control instructions from I/O control 60. It also includesan interrupt control circuit 65, a peripheral control circuit 66, amagnetic card control circuit 67, a printer control circuit 68, and adisplay control circuit 69 for variously controlling the input andoutput units and issuing control signals QFG and EBT to I/O control 60via two output lines 71 and 72. These last mentioned control circuitsvariously perform their control functions in response to control signalPOP from the power supply, I/O qualifier control signals from CPU 48,I/O control instructions from I/O control 60, and control signals fromkeyboard input unit 12. Interrupt control circuit 65 initiates thetransfer of information into I/O register 56 from keyboard input unit 12or interrupting peripheral input units 28 such as the marked card readerand issues a qualifier control signal QNR to CPU 48 via output lines 73.Peripheral control circuit 66 enables interface modules 30 plugged intothe calculator to respond to information from I/O register 56, controlassociated peripheral units 28, transfer information to and/or receiveinformation from associated peripheral units 28, and in some casesinitiate the transfer of information to I/O register 56 from theinterface modules themselves. Magnetic card control circuit 67 enablesmagnetic card reading and recording unit 14 to respond to information inI/O register 56 and either read information into I/O register 56 from amagnetic card 16 or record information onto a magnetic card 16 from I/Oregister 56. Printer control circuit 68 and display control circuit 69enable output display unit 18, and output printer unit 20, respectively,to respond to information from I/O register 56.

When a basic I/O instruction obtained from memory unit 46 is to beexecuted, CPU 48 transfers control to I/O control 60 by issuing a pairof I/O microinstructions PTR and XTR thereto. In response to these I/Omicroinstructions from CPU 48, control signal POP from the power supply,control signals QFG and EBT from I/O gating control circuitry 58, andI/O qualifier and clock control signals from CPU 48, I/O control 60selectively issues one or more I/O control instructions to gatingcontrol circuitry 58 as required to execute the basic I/O instructiondesignated by CPU 48 and issues control signals, TTX, XTR, QRD, and SCBto CPU 48 via output lines 74-77. The I/O qualifier control signalsissued to I/O control 60 and gating control circuitry 58 by CPU 48 arederived from the basic I/O instruction to be executed. Those qualifiercontrol signals issued to I/O control 60 designate the specific I/Ocontrol instructions to be issued by I/O control 60, while those issuedto gating control circuitry 58 designate selected control circuits to beemployed in executing the basic I/O instruction.

Memory unit 46 includes a modular random-access read-write memory 78(hereinafter referred to as the RWM), a modular read-only memory 80(hereinafter referred to as the ROM), a memory address register 82(hereinafter referred to as the M-register), a memory access register 84(hereinafter referred to as the T-register), and control circuitry 85for these memories and registers. RWM 78 and ROM 80 comprise MOS-typesemiconductor memories.

Routines and subroutines of basic instructions for performing the basicfunctions of the calculator and constants employed by these routines andsubroutines are stored in these portions of ROM 80. An additional 3,072sixteen-bit words of ROM may also be added on pages 4, 5, and 6 in stepsof 512 and 1,024 words. This is accomplished by simply inserting plug-inROM modules 92 into receptacles 94 provided therefore in top panel 90 ofthe calculator housing as illustrated in FIG. 1 by thepartially-inserted plug-in ROM module on the left. As each plug-in ROMmodule 92 is inserted into one of these receptacles a spring-loaded door95 at the entrance of the receptacle swings down allowing passage of theplug-in ROM modules. Once the plug-in ROM module is fully inserted asillustrated by the plug-in ROM module on the right, a printed circuitterminal board 96 contained within the plug-in ROM module plugs into amating edge connector mounted inside the calculator. A handle 98pivotally mounted at the top end of each plug-in ROM module 92facilitates removal of the plug-in ROM module once it has been fullyinserted into one of the receptacles 94.

Routines and subroutines of basic instructions (and any neededconstants) for enabling the calculator to perform many additionalfunctions are stored in each plug-in ROM module 92. The user himself maytherefore quickly and simply adapt the calculator to perform manyadditional functions oriented toward his specific needs by simplyplugging ROM modules of his own choosing into the calculator. Addedplug-in ROM modules are automatically accommodated by the calculator bymomentarily interrupting power or by depressing an ERASE MEMORY key, andthey are associated with definable section 91 of keyboard input unit 12or employed to expand the functions performed by this and other sectionsof the keyboard input unit.

Referring again to FIGS. 3A-B, M-register 82 of the memory unitcomprises a recirculating sixteen-bit serial shift register into whichinformation may be transferred bit-serially from CPU 48 via T-bus 52 andout of which information may be transferred bit-serially to CPU 48 viaS-bus 50. Information shifted into M-register 82 may be employed toaddress any word in RWM 78 or ROM 80 via fifteen output lines 106.

T-register 84 of the memory unit comprises a recirculating sixteen-bitserial shift register into which information may be transferred eitherbit-serially from CPU 48 via T-bus 52 or in parallel from any addressedword in RWM 78 and ROM 80 via sixteen parallel input lines 108.Information may be transferred from T-register 84 either bit-serially toCPU 48 via S-bus 50 or in parallel to any addressed word in RWM 78 viasixteen parallel output lines 110. The four least significant bits ofinformation contained in T-register 84 may comprise binary-coded-decimalinformation and may be transferred from the T-register in parallel toCPU 48 via three parallel output lines 112 taken with S-bus 50.

The control circuitry 85 of the memory unit controls these transfers ofinformation into and out of M-register 82 and T-register 84, controlsthe addressing and accessing of RWM 78 and ROM 80, and refreshes RWM 78.It performs these functions in response to memory microinstructions,memory clock pulses, and shift clock pulses from CPU 48.

CPU 48 includes a register unit 114, an arithmetic-logic unit 116(hereinafter referred to as the ALU), a programmable clock 118, and amicroprocessor 120. Register unit 114 comprises four recirculatingsixteen-bit shift registers 122, 124, 126, and 128 and one four-bitshift register 130. Shift registers 122 and 124 serve as sixteen-bitserial accumulator registers (hereinafter referred to as the A-registerand the B-register, respectively) into which information may betransferred bit-serially from ALU 116 via T-bus 52 and out of whichinformation may be transferred bit-serially to ALU 116 via R-bus 54. Thefour least significant bit positions of A-register 122 also serve as afour-bit parallel accumulator register into which four bits ofbinary-coded-decimal information may be transferred in parallel from ALU116 via four parallel input lines 132 and out of which four bits ofbinary-coded-decimal information may also be transferred in parallel toALU 116 via three parallel output lines 134 taken with R-bus 54.

Shift register 126 serves as a sixteen-bit system program counter(hereinafter referred to as the P-register) into which information maybe transferred bit-serially from ALU 116 via T-bus 52 and out of whichinformation may be transferred bit-serially to ALU 116 via R-bus 54.Information contained in the least significant bit position ofP-register 126 may also be transferred as a qualifier control signal QPOto microprocessor 120 via output line 135.

Shift register 128 serves as a sixteen-bit qualifier register(hereinafter referred to as the Q-register) into which information maybe transferred bit-serially from ALU 116 via T-bus 52 and out of whichinformation may be transferred bit-serially to ALU 116 via R-bus 54.Information contained in the five least significant bit positions ofQ-register 128 is transferred to I/O gating control circuitry 58 as fiveone-bit I/O qualifier control signals Q00-Q04 via five parallel outputlines 136, and information contained in the six next least significantbit positions of the Q-register is transferred to I/O control 60 as sixone-bit I/O qualifier control signals Q05-Q10 via six parallel outputlines 138. Similarly, information contained in the seven leastsignificant, the ninth and eleventh least significant, and the mostsignificant bit positions of Q-register 128 and information derived fromthe thirteenth, fourteenth, and fifteenth bit positions of theQ-register may be transferred to microprocessor 120 as eleven one-bitmicroprocessor qualifier control signals Q00-Q06, Q08, Q10, Q15, and QMRvia eleven output lines 140. Information contained in the twelfththrough the fifteenth least significant bit positions of Q-register 128may be transferred to miroprocessor 120 as a four-bit primary addresscode via four parallel output lines 142.

Shift register 130 serves as a four-bit serial extend register(hereinafter referred to as the E-register) into which information maybe transferred bit-serially either from ALU 116 via T-bus 52 or from theleast significant bit position of T-register 84 via input line 144.Information may be also transferred out of E-register 130 to ALU 116 viaR-bus 54.

Register unit 114 also includes control circuitry 146 for controllingthe transfer of parallel binary-coded decimal information into and outof A-register 122 and the transfer of serial binary information into andout of A-register 122, B-register 124, P-register 126, Q-register 128,and E-register 130. This is accomplished in response to registermicroinstructions from microprocessor 120, control signals TTX and XTRfrom I/O control 60, and shift clock control pulses from programmableclock 118. Control circuitry 146 includes a flip-flop 148 (hereinafterreferred to as the A/B flip-flop) for enabling the transfer ofinformation into and out of either the A-register 122 or the B-register124 as determined by the state of the A/B flip-flop 148 is initiallydetermined by information Q11 transferred to the A/B flip-flop from thetwelfth least significant bit position of Q-register 128 but may besubsequently complemented one or more times by microinstruction CAB frommicroprocessor 120.

ALU 116 may perform either one-bit serial binary arithmetic on datareceived from T-register 84 or M-register 82 via S-bus 50 and/or fromany register of register unit 114 via R-bus 54 or four-bit parallelbinary-coded-decimal arithmetic on data received from T-register 84 viaoutput lines 112 taken with S-bus 50 and/or from A-register 122 viaoutput lines 134 taken with R-bus 54. It may also perform logicoperations on data received from memory unit 46 and/or register unit 114via any of these lines. The arithmetic and logic operations performedare designated by ALU microninstructions from microprocessor 120 and arecarried out in response to these microinstructions, shift clock controlpulses from programmable clock 118, and control signal SCB from I/Ocontrol 60. Information is also transferred from ALU 116 to A-register122 via output lines 132 or to I/O register 56, M-register 82,T-register 84, or any register of register unit 114 via T-bus 52 inresponse to microinstructions and control signals applied to theseregisters. If a carry results while ALU 116 is performing either one-bitserial binary arithmetic or four-bit parallel binary-coded-decimalarithmetic, the ALU issues a corresponding qualifier control signal QBCand QDC to microprocessor 120 via one of two output lines 152 and 154.

Programmable clock 118 includes a crystal-controlled system clock 156, aclock decoder and generator 158, and a control gate 160. System clock156 issues regularly recurring clock pulses to clock decoder andgenerator 158 via output line 162. In response to these regularlyrecurring clock pulses from system clock 156 and to four-bit clock codesfrom microprocessor 120, clock decoder and generator 158 issues trainsof n shift clock pulses to ALU 116, M-register 82, T-regiser 82, and allof the registers of register unit 114 via output line 164. These trainsof n shift clock pulses are employed for shifting a corresponding numberof bits of serial information into or out of any of these registers orfor shifting a carry bit in the ALU. The number n of pulses in each ofthese trains may vary from one to sixteen as determined by the number ofbits of serial information required during each operation to beperformed. In response to a control signal CCO from microprocessor 120,control gate 160 prevents any shift clock pulses from being applied tothe ALU or any of these registers. Upon completion of each train of nshift clock pulses, clock decoder and generator 158 issues a ROM clockpulse to microprocessor 120 via output line 166 and an I/O clock pulseto I/O control 60 via output line 168. In response to the regularlyrecurring clock signal from system clock 56, clock decoder and generator158 also issues correspondingly regularly recurring memory clock pulsesto memory unit 46 via output line 170.

Microprocessor 120 selectively issues two I/O microinstructions to I/Ocontrol 60 via two output lines 172, six memory microinstructions tomemory unit 46 via six output lines 174, thirteen registermicroinstructions to register unit 114 via thirteen output lines 176,and five ALU microinstructions to ALU 116 via five output lines 178. Italso issues a four-bit clock code associated with each of thesemicroinstructions to clock decoder 158 via four output lines 180. Thesemicroinstructions and associated clock codes are issued as determined bythe control signal POP from the power supply, the eleven microprocessorqualifier control signals from Q-register 128, the four-bit primaryaddress codes from Q-register 128, and the five microprocessor qualifiercontrol signals from I/O control 60, interrupt control 65, ALU 116, andP-register 126.

KEY OPERATIONS

All operations performed by the calculator may be controlled orinitiated by the keyboard input unit and/or by keycodes entered into thecalculator from the keyboard input unit, the magnetic card reading andrecording unit, or peripheral input units such as the marked card readerand stored as program steps in the program storage section of the RWM.An operational description of the keyboard input unit is therefore nowgiven with specific reference to FIG. 1, except as otherwise indicated.

TURN-ON PROCEDURE

When the OFF/ON switch located on the front of the calculator is set tothe ON position, the following display appears:

    φ :  END

The calculator is then ready for operation.

INITIALIZING THE CALCULATOR

The ERASE key has the same effect as switching the calculator off andthen on again. It erases all stored data and programs from memory andclears the results of any previous calculation or operation.

THE FUNDAMENTAL USER OPERATION

Communication with the calculator is through the display. In general,there are two basic steps to follow when performing operations:

1. A set of directions is written into the display by actuating theappropriate keys.

2. The calculator is then instructed to follow these directions, and theresult of any numerical operation is automatically displayed. Whenmaking keyboard calculations, this step consists soley of actuating theEXECUTE key.

These two basic steps form the fundamental user operation. With a fewexceptions, all operations such as making calculations, loading orrunning programs, giving directions to the printer, etc., consist ofsome variation of the fundamental user operation.

DIAGNOSTIC NOTES

In addition to displaying numbers, directions, and the results ofoperations, the calculator also displays diagnostic notes to inform theuser of operational errors or of special situations. The basic notes arenumbered from 01 to 16 (higher numbered notes are associated with thevarious plug-in ROM's). The note number indicates the type of error orsituation. For example, NOTE 01 indicates that the calculator was givena direction which it could not understand; NOTE 16 indicates that theprinter paper supply has been exhausted. A list of the basic notes and abrief description of their meanings is given in the appendix at the endof Key Operations.

When a note condition occurs in a program execution is halted. Thedisplay then indicates the note as well as the number of the programline in which the note condition occurred; e.g.,

    NOTE  φ2  IN  4

indicates that a note 02 condition occurred during line 4.

KEYING DIRECTIONS AND NUMBERS

Directions are written into the display by actuating the appropriatekeys. Suppose, for example, that the user desires to add 2 to 4 andprint out the result. The keys PRINT 2 + 4 are actuated. The calculatordoes not, however, follow these directions until it is instructed to doso by actuating EXECUTE. It then prints (and displays) and result, 6.Numbers are keyed into the display, as on any standard office-machine,by actuating the number keys (o through 9) and the decimal point key inthe required order. If a number is negative the minus sign should bekeyed first before the number is keyed. Use of commas (such as in32,351.6) is not allowed. As is the case with a direction. even thoughthe keyed number is dispayed, it will not be executed by the calculatoruntil the EXECUTE key is actuated. It is not normally desirable toexecute just a single number. The number would usually be includedwithin some set of directions, and then the directions would beexecuted.

USE OF CLEAR

The CLEAR key clears the display, but leaves the memory unaltered. Itoperates immediately and does not have to be followed by EXECUTE. Anend-of-line symbol () appears in the display when CLEAR is actuated,which indicated that the calulator is idle. It is not necessary to clearthe display before keying the next direction as long as the previousdirection has been executed. In this case use of CLEAR is optional. Ifno subsequent execution has taken place since the last direction waskeyed, then CLEAR must be used. These keys will be printed, andsubsequent tracing will cease.

MAKING ARITHMETIC CALCULATIONS

For arithmetic, the fundamental user operation consists of writing anarithmetic expression into the display and then actuating the EXECUTEkey, to instruct the calculator to evaluate that expression. Anarithmetic expression is written into the display by pressing keys inthe same order as they would be written on paper, one key per characteror symbol. The arithmetic expression may then be executed by simplypressing the EXECUTE key. This is illustrated by the keying sequencesand displayed answers given below.

    ______________________________________                                        Keying Sequence      Displayed Answers                                        ______________________________________                                        3 + 6 EXECUTE        9.00                                                     9 . 3 - 6 EXECUTE    3.30                                                     - 7 EXECUTE          - 7.00                                                   6 * ( - 7 ) EXECUTE  - 42.00                                                  8 . 2 5 * 4 EXECUTE  33.00                                                    6 * 3 / ( 1 1 - 2 ) EXECUTE                                                                        2.00                                                     √ 3 EXECUTE   1.73                                                     √ 4 + 5 EXECUTE                                                                             7.00                                                     √ ( 4 + 5 ) EXECUTE                                                                         3.00                                                     ______________________________________                                    

As in the above examples, quantities in parentheses are treated as onequantity. Thus √(4+5) is equivalent to √9, whereas, √4+5 adds 5 to thesquare root of 4. The expression 4(3+2) is the equivalent of theexpression 4*(3+2). Use of the multiplication operator is implied and istherefore optional in such cases. Parentheses can be nested (i.e.,parentheses inside parentheses, etc.) but they must always be balanced,that is, there must be the same number of left-handed parentheses asthere are right-handed.

THE ARITHMETIC HIERARCHY

When an arithmetic expression contains more than one operator, as doseveral of the preceding examples, there is a prescribed order ofexecution. An expression must be properly written or the answer will bewrong. The order of execution, known as the hierarchy is shown below:

1. Mathematical functions such as square root;

2. Implied multiplication;

3. Multiplication and division; and

4. Addition and subtraction.

Where an expression contains two or more operators at the same level inthe hierarchy, they will be executed in order from left to right. Theuse of parentheses enables the order of execution to be changed. Thus,in the expression √(4+5) the addition operator is executed before thesquare root operator even though the addition operator occupies a lowerlevel in the hierarchy.

EXCEEDING THE LENGTH OF THE DISPLAY

The length of an expression is not limited to the length of the display.As each excess symbol is keyed, the display shifts left to make room.The maximum allowable length for an expression varies between 35 and 69keystrokes, depending upon the nature of the expression. If too manykeys are pressed the display shows NOTE 09 (see the section ondiagnostic notes below). Depending upon the nature of the expression thenote may appear either before or after the EXECUTE key is pressed. Ineither case, the operator must press CLEAR and write a shorterexpression.

MAKING CORRECTIONS

The BACK and FORWARD keys enable a displayed expression to be altered orcorrected without re-keying the entire sequence. If a wrong key ispressed when writing an expression, it can be corrected immediately bypressing the BACK key followed by the correct key, as illustrated below:

    ______________________________________                                        Keying Sequence       Display                                                 ______________________________________                                        2 + BACK * 4          2 * 4                                                   ______________________________________                                    

A displayed expression can be blanked, key by key in reverse order, bypressing BACK once for each displayed key. The blanked keys can then bereturned to the display one at a time by pressing FORWARD. If anexpression contains a wrong key, press BACK until that key is blanked,press the correct key and then press FORWARD to return each subsequentkey (or, if extra keystrokes are required, key in the remainder of theexpression). For example, if the number 123456789 is keyed incorrectlyinto the display as 123444789, the error may be corrected as indicatedby the following steps:

    ______________________________________                                        Keying Sequence        Display                                                ______________________________________                                        BACK BACK BACK BACK BACK                                                                             1234                                                   5 6 FORWARD FORWARD FORWARD                                                                          123456789                                              ______________________________________                                    

If the incorrect expression has been executed but no key has since beenpressed, the expression can be returned to the display (by pressingBACK), corrected as before, and then again executed.

Any line of a stored program may be recalled into the display and thencompletely blanked by repeatedly actuating the BACK key. One additionalactuation of the BACK key will bring the entire next preceding line ofthe stored program into the display. It is then possible to backstepthrough that line and bring its predecessor into the display, etc.Analogously, the FORWARD key may be repeatedly actuated to bring thoselines succeeding the current line into the display.

To remove a portion of a line the BACK key is repeatedly actuated untilthe right most character, symbol or mnemonic of the portion to bedeleted becomes the right most item in the display. The DELETE key isthen actuated once for each character, symbol or mnemonic to be removed.Then, if the right most item of the line is not visible in the display,the FORWARD key is repeatedly actuated. The user may then continuewriting the line, execute it, or store it, as appropriate. For example,assume it is desired to delete the underlined portion from the followingline:

    FXD 2;X→Y;PRT (A+B)/A;GTO 4

This is accomplished by repeatedly actuating the BACK key until thedisplay appears as follows:

    ;X→Y;PRT (A+B)/A

Next, the DELETE key is actuated thirteen times. At first the displayshifts to the right to bring the first part of the line into view, whichin this case is FXD 2. However, FXD will not appear until there is roomin the display for all four characters plus the space between D and 2.After this first part of the line comes into view, the line appears toshorten by losing an item from the right-hand side of the display eachtime the DELETE key is actuated, while the rest of the line remainsstationary. After the segment has been deleted, the FORWARD key isrepeatedly actuated until the end of the now modified line comes intoview as follows:

    FXD 2;GTO 4

The user may now continue writing this line, execute it, or store it, ashe desires.

To add a segment to the interior of a line the BACK key is repeatedlyactuated until the right most item visible in the display is thecharacter, symbol or mnemonic immediately preceding the segment soughtto be added. The INSERT key is then actuated and followed by the keyswhich describe the desired segment. The FORWARD key is next repeatedlyactuated until the end of the line is in view. As the keys followingINSERT but preceding FORWARD are actuated their mnemonics are insertedinto the line with no loss of any other items in the line. Theright-hand portion of the line is shifted to the right to make room forthe additional items being inserted. This action continues until one ofthe keys, BACK, FORWARD, DELETE, CLEAR, EXECUTE or STORE is actuated.Generally the insertion of a portion of a line is terminated with theFORWARD key to return to the end of the line. For example, assume it isdesired to insert the portion

     2φ→ B

into the line

     1φ→ A;3φ→ C

To accomplish the insertion, the BACK key is repeatedly actuated untilthe semicolon becomes the right most item in the display. The INSERT keyis then actuated and followed by the key sequence 2φ→B. Next, theFORWARD key is actuated until the entire line is visible as follows:

     1φ→ A;2φ→ B;3φ→ C

if an error is made by the user during the entry of a portion of a linebeing inserted into an existing line, the erroneous items may be removedby actuating the DELETE key. The user may then continue writing thedesired line portion after actuating the INSERT key.

In addition to modifying individual lines of a program as discussedabove, it is also possible to insert entire lines into or delete entirelines from, the interior of a program stored in memory. If it is desiredto add a line between existing lines 4 and 5, the added line wouldbecome new line 5 while the old line 5 would become the new line 6.Similarly, if it is desired to remove line 3 from a program, the oldline 4 would become the new line 3, the old line 5 would become the newline 4, etc. In both cases the number of available R registers isautomatically adjusted after the change.

To insert a line into a program the program line counter is first set tothe line number which will be associated with the new line. This may beaccomplished, for example, by actuating the GO TO key followed by thenumber keys representing the line number followed by the EXECUTE key.The new line is then written into the display and followed by sequentialactuation of the INSERT and STORE keys. The new line becomes stored, andall succeeding lines of the program together with their line numbers areshifted to provide room.

To delete a line from a program the program line counter is first set tothe line number of the line to be deleted. Sequential actuation of theRECALL and DELETE keys will remove the line and shift all succeedinglines and their line numbers to close the gap.

THE DATA MEMORY

The basic calculator contains 179 registers: six storage and workingregisters (A, B, C, X, Y and Z) and 173 program and data storageregisters (R0 through R172). An additional 256 R-registers (R173 throughR428) may be added giving a total of 435 registers.

The A, B, C, X, Y and Z registers are selected by pressing the A, B, C,X, Y and Z keys, respectively, while the R registers are selected bypressing the R() key followed by the appropriate number keys 0 through172 or 428. The argument of the R() key may be a computed quantity. Forexample, sequentially pressing the R(), (, 7, 0, /, 2, and ) keysdenotes the R35 register. The argument of the R() may also be avariable. Then, if register A contains the number 15, sequentiallypressing the R() and A keys denotes R15 register. Similarly, if the R5register contains the number 10 and the C register contains the number25, sequentially pressing the R(), (, R() 5, + , C, and ) denotes theR35 register.

The register denoted by the keying sequence R(), R(), R() . . . R()followed by one or more number keys is determined by the numberdesignated by the number keys and by the numbers contained in thevarious registers. For example, the keying sequence R(), R(), 2 denotesthe R8 register if R2 contains the number 8.

When the number following the R() key does not have a strictly integralvalue, the fractional part of the value is ignored. Thus, the keyingsequence R(), 3,5,6, ., denotes the R35 register. A plus signimmediately following the R() key is dropped when the line containing itis stored. Thus, the keying sequence R(), +, /, % is stored as R() 35. Aminus sign immediately following the R() key is not permitted, andcauses a syntax error (NOTE φ1) If the R() key is followed by a quantitywhose value is either negative, or greater than the number of availableR registers, an error during execution results (the indication will beeither NOTEφ5 or NOTE φ6, depending upon the exact circumstances).

Some of the plug-in read-only memory modules require part of the memoryfor their own use. When one of these modules is installed, itautomatically takes the required registers, starting at the highestnumbered register and working downwards. Those registers are thentemporarily not available for program or data storage, until the moduleis removed.

When programs are stored they start in the highest-numbered availableR-register and sequentially fill the memory downwards. Programs cannotbe stored in the A, B, C, X, Y and Z registers. It is, therefore, mostconvenient to store data first in the A, B, C, X, Y and Z registers andthen in the lower numbered R-registers. If the memory contains noprogram (i.e. at turn-on, or if ERASE has been pressed), then allregisters except those required by a plug-in read-only memory modulewill be available for data storage. If the memory does contain aprogram, then the higher-numbered registers will not be available fordata diagnostic NOTE φ6 will be displayed if the operator attempts tostore data in a register which is not available.

The number of available R-registers can be determined at any time bypressing CLEAR LIST STOP. The printer will start to list the program(the STOP saves having to wait for the whole program to be listed). Atthe bottom of the list will be a number preceded by the letter Rindicating the number of R-registers available. (The lowest-numberedregister is RO; substract 1 from the number printed to obtain the nameof the highest-numbered register available for data storage).

STORING DATA

One register can contain one data-number. It is not necessary to clear aregister before storing a number in it because the number being storedautomatically substitutes for the existing stored number. the entirememory is, however, cleared at turn-on or if ERASE is pressed. Storingdata requires use of the →key. For example, pressing

     1 2 . 6 → A   EXECUTE

stores 12.6 in the A register. Similarly, pressing

     6 →  X   EXECUTE

stores 6 in the X register, and pressing

     1 9 →  R () 1 2   EXECUTE

stores 19 register R 12. A stored number may be viewed by using eitherthe DISPLAY or the PRINT keys. For example, pressing

    DISPLAY A   EXECUTE

displays the number currently stored in A (the number remains stored inA). Simiarly, pressing

    PRINT R() 1 2   EXECUTE

prints the contents of R 12 (the number remains stored in R12).

IMPLIED Z

In general, if a stored number is to be kept for any length of time itshould not be stored into the Z register because the result of anyarithmetic expression is automatically stored in Z if no othr storagelocation is specified, thus

     1 4 . 2   EXECUTE

is equivalent to

     1 4 . 2 →  Z   EXECUTE

both expressions result in a display 14.2 which is also stored in the Zregister. Similarly,

     3 * 4 + 1 6 / 3   EXECUTE

8 is equivalent to

     3 * 4 + 1 6 / 3 → Z   EXECUTE

a statement involving numerical activity usually contains aninstruction, such as PRT, DSP, or →. If there is no such instruction,the form <quantity>→Z; or <mathematical expression>→Z, is usuallyautomatically assumed when the line is executed or stored.

The automatic addition of Z onto the end of a statement is called the`implied store in Z`.

For instance, if the operator presses A EXECUTE to view the contents ofA, the line A→Z is what is actually executed. The contents of A are seenbecause that is the numerical quantity associated with the lastassignment instruction executed in the line. Meanwhile, the contents ofZ have been replaced by those of A, and are lost. The recommendedprocedure for viewing the contents of a register is to use the PRINT orDISPLAY statements, as they do not disturb the contents of anyregisters.

Because of the implied store into Z, the Z register is not recommendedfor storing data during calculations performed from the keyboard, exceptin certain situations. For instance, suppose the operator wished to adda series of numbers; n₁, n₂, n₃, . . . To do this, the register is firstset to zero by executing the line 0→Z. Then, the numbers are added inthe following manner:

n₁ + Z

n₂ + Z

n₃ + Z

Because of the implied store into Z, this is what is actually happening:

    ______________________________________                                        n.sub.1 + Z → Z                                                                          n.sub.1 + 0 → Z                                      n.sub.2 + Z → Z                                                                          n.sub.2 + n.sub.1 → Z                                n.sub.3 + Z → Z                                                                          n.sub.3 + (n.sub.1 + n.sub.2) → Z                    ______________________________________                                    

REGISTER ARITHMETIC

Arithmetic expressions may be written using register names instead ofactual numbers. When the expression executed, the values currentlystored in those registers will be automatically substituted for theregister names in order to evaluate the expression. For example, assumethe user has made the following storage assignments:

12.6 A

6 in X

19 in R12

With the above values stored, the keying sequence

    A + R() 1 2 - X   EXECUTE

would be equivalent to the keying sequence

    1 2 . 6 + 1 9 - 6   EXECUTE

other values stored in these registers would, of course, give adifferent result for the same expression.

Numbers and register-names may be mixed in an expression, as follows:

     3 * 1 2 . 6 + 4 - 6   EXECUTE

fixed- and floating-point numbers

numbers can be keyed into the display and displayed in either fixedpoint or floating point notation. In fixed-point notation, a numberappears in the display as commonly written, with the decimal pointcorrectly located. Floating-point numbers are written with the decimalpoint immediately following the first digit (discounting leading zeros)and with an exponent. The exponent, which represents a positive ornegative power of ten, indicates the direction, and the number ofplaces, that the decimal point should be moved, to express the number asa fixedpoint number. In the calculator the exponent may be any integerwithin the range -99 to +99. Examples of fixed point and floating pointnotation follow:

    ______________________________________                                        Fixed      Floating                                                           ______________________________________                                        1234.5 =       1.2345 × 10.sup.3                                         0.0012345                                                                            =        1.2345 × 10.sup.-3                                                                     ##STR1##                                      1.2345 =       1.2345 × 10.sup.0                                        ______________________________________                                    

The FIXED N key selects fixed point display of displayed results. Theletter N indicates that the key must be followed by one of the numberkeys (0 through 9) to select the number of digits to be displayed to theright of the decimal point.

The FLOAT IN key operates in the same way as FIXED N except thatfloating point display is selected, with N designating the requiredpower of ten. (When the calculator is turned on, FLOAT 9 isautomatically assumed.) For example, the number 123.456789 in float 9notation be displayed as 1.23456789φEφZ. The letter E in the displayindicates that the next two digits constitute the exponent. If theexponent is negative a minus sign follows the E, as illustrated below.

    ______________________________________                                        Keying Sequence             Display                                           ______________________________________                                        0     0 1 2 3 4     EXECUTE     1.234000000E-03                               ______________________________________                                    

No more than ten significant digits can be displayed; therefore if anumber becomes too large to be properly displayed as a fixed pointnumber, it will be automatically displayed as a floating point number.If the number becomes too small, only zeros are displayed but the numbermay still be seen if floating point notation is then selected.

The ENTER EXPONENT key is used to designate the E (exponent) whennumbers are being keyed in floating point form, as illustrated below:

    ______________________________________                                        Keying Sequence            Display                                            ______________________________________                                                                FLOAT N 4                                                                              EXECUTE                                          2     .     5   6   ENTER 2  EXECUTE   2.5600E 02                                                 EXP                                                   4   .     7     3       ENTER - 2                                                                              EXECUTE   4.7300E-02                                                 EXP                                                   ______________________________________                                    

RANGE OF CALCULATION

The range of the calculator is from ±10⁻⁹⁹ to ±9.999999999 X 10⁹⁹ ; whenthis range is exceeded during a calculation diagnostic NOTE 10 isdisplayed. Calculations which normally result in zero, such assubtracting a number from a number equal to itself, do not exceed therange.

OPERATING THE PRINTER

The print key is used to print both numerical values and alphamericmessages (the form of a numerical printout is changed by the FIXED N andFLOAT N keys in the same way as the display is changed). This isillustrated by the following examples (in which it is assumed the FIXEDN key, 2 key and EXECUTE key have previously been pressed to determinethe form of the printout):

    ______________________________________                                        Printing Operation                                                                        Keying Sequence     Printout                                      ______________________________________                                        Print A Number                                                                            PRINT 1 2 3  EXECUTE    123.00                                    ______________________________________                                    

Print result of a calculation

    PRINT 6 + 8 / 2    EXECUTE   10.φφ

print contents of a storage register

    PRINT A   EXECUTE   (CONTENTS OF A)

to print an alphanumeric message requires the use of the quote key (" ")to both start and end the message (the quote symbol is not printed) asillustrated by the following example:

Keying Sequence

    PRINT "M E S S A G E MESSAGE SPACE N O . 2 " EXECUTE

printout

    MESSAGE NO. 2

no more than sixteen characters (including spaces) can be printed on oneline of a message, and each line must be enclosed in quotes. Whenfollowng the same PRINT instruction, lines must be separated by commas,as indicated below:

    PRINT "---", "---" EXECUTE

this prints two lines. If messages and values are to be mixed, they mustbe separated by a comma as illustrated by the following example in whichit is assumed that the number 456 has been stored in the A register.

    PRINT " A = " , A   EXECUTE   A=456.φφ

pressing the SPACE N key followed by one or more number keys designatingany one of the numbers 0 through 15 causes the printer to spacevertically (the number key specified in the number of lines spaced).This is illustrated by the following example:

    ______________________________________                                        Keying Sequence          Printout                                             ______________________________________                                        PRINT " D A Y S " EXECUTE                                                                              DAYS                                                 SPACE N 2 EXECUTE                                                             PRINT 4 EXECUTE          4.00                                                 ______________________________________                                    

When used in a message, most keys result in the character printed beingthe same as the character on the key. The following keys are theexceptions:

1. SPACE prints one blank character-space

2. GO TO prints

3. R() prints :

4. STOP prints -

5. ENTER EXP prints |

The following keys either cannot be used in a message or they result insome meaningless character being printed:

1. All of the half-keys at the top of the keyboard and the four blankkeys in the left-hand keyblock.

2. The EXECUTE key, RUN PROGRAM key, and STORE key.

3. The JUMP key, END key, IF key, GO TO/SUB key, FLAG N key, RETURN key,and SET/CLEAR FLAG N key.

PROGRAMS

A program enables the calculator to automatically execute the keysnecessary to solve a particular problem. First the program must beloaded into the calculator's memory to teach the calculator which keysequences are required and the order in which they are to be executed.Once loaded, the calculator can remember that program until a new one isloaded over it or until the calculator is switched off. A program neednot be keyed into the calculator more than once because a loaded programcan be recorded on magnetic cards. Recorded programs may then be loadedback into the calculator any time in the future. Once the program hasbeen loaded, it is initialized, and then execution is commenced byactuating RUN PROGRAM key.

A complete program consists of lines of program information, each ofwhich may be separately loaded into the calculator memory from thekeyboard by actuating the STORE key when the line has been completed. Anend-of-line symbol is automatically displayed at the end of each lineafter that line has been stored. A program line counter keeps track ofwhich line of a program is currently being executed or is about to beexecuted or stored next. Before storing a line into the calculatormemory, it may be edited with the aid of the BACK, FORWARD, CLEAR,DELETE and INSERT keys. After all lines of the program have been stored,individual lines may be recalled into the display for editing or otherpurposes. Recall is accomplished by sequentially actuating the CLEAR andGO TO keys followed by the number keys representing the line number ofthe line to be recalled followed, finally, by the RECALL key. Whenrestoring the recalled line or the edited version thereof it is onlynecessary to actuate the STORE key.

MAGNETIC PROGRAM CARDS

A magnetic card 16 such as that shown in FIG. 1 is used to permanentlyor temporarily store programs or data. The card has two sides that maybe used independently to store either data or programs (however, dataand programs cannot be mixed on the same side of the card). Once arecording has been made on a card-side, that card-side can be protectedfrom erasure by tearing out a corresponding protect tab on the card. Therecording on a protected card side cannot be changed.

A program loaded into the memory may be recorded on a magnetic card 16by pressing

    END   EXECUTE   RECORD   EXECUTE

to start the card-reader motor and by then inserting an uprotected cardinto the card reader. The program from the card may be loaded back intothe memory by first sequentially pressing the ERASE key to clear thememory, by then pressing the END, EXECUTE, LOAD and EXECUTE keys, and bythereupon inserting the card into the card reader.

THE PROGRAM LINE

Even though the lines of a program are stored in the same memory asdata, the length of individual lines bears no relationship to the lengthof a register. The calculator simply uses however many registers arenecessary to accommodate a particular line. The length of a line isdetermined by the programmer and depends upon the requirements of hisprogram. However, the length is limited by machine requirements, in thesame way that an individual expression is limited (see Exceeding theLength of the Display). Diagnostic NOTE 09 appears either before orafter STORE is pressed, if the line is too long. When NOTE 09 appearsthe operator should press CLEAR and key in a completely new (shortened)line.

Line numbers are automatically assigned, by the calculator, in strictnumerical sequence, beginning with line 0. The operator must know thatline numbers will be assigned if there are any GO TO statements in hisprogram. The line numbers are not strictly a part of the program becausethey will automatically change if the program is moved to a differentlocation in memory. For example, suppose a program (No. 1) is a ten-lineprogram (lines 0 through 9) and is already stored in the memory. If asecond program (No. 2) is now loaded below program No. 1, then the firstline of program No. 2 will be line 10, whereas, if program No. 2 hadbeen the only program in the memory, then its first line would have beenline 0. (Any GO TO statements must be corrected, by the programmer, toreflect any such line number changes.)

A line can have one or more statements, separated by semicolons. Theactual number of statements on any one line is generally notsignificant, it being more important to have the statements in thecorrect order rather than on a particular line. Position of a statementdoes become significant where a line contains an IF statement or where abranch is to be made. In the former case, those statements which are tobe conditionally executed must be on the same line as the IF statementand must come after the IF. In the latter case, a branch is always madeto the beginning of a line. Therefore, the first statement to beexecuted after a branch must be the first statement of the line to whichthe branch is made. It is recommended that not too many statements beput on one line because a short line is easier to change (once stored)than a long line.

THE DATA ENTRY STATEMENT

Program statements resulting from actuations of the ENTER key are usedto halt the program during execution so that the user can key in data.The simplest statement contains only a register name, which is displayedwhen program execution is halted. The data keyed during the halt isstored, into the register designated, when RUN PROGRAM is subsequentlypressed. For example, ENT A; results in the keyed data being stored inregister A. An enter statement may contain several register names (whichmust be separated by commas). The program will halt for each register inturn. For example, ENT A, R13, X; is the equivalent of the threeseparate statements ENT A; ENT R13; ENT X; A label (followed by a comma)may precede the register name. In this case the label will be displayed,instead of the name, when the halt occurs. For example, ENT "A=?", A;displays A=?and stores the subsequent data entry into register A.

BRANCHING

Program lines are normally executed in numerical sequence. However, somestatements cause the sequence of execution to be changed. This is knownas branching (instead of the program going to the next sequential line,it branches to some other specified line and continues program executionthere). There are two kinds of branching, conditional and unconditional.Unconditional branching is accomplished with the GO TO, JUMP and GO TOSUB keys while conditional branching is done with the IF key.

There are three types of unconditional branching with GO TO. The firsttype is an absolute GO TO. On absolute GO TO statements take the form GOTO N, where N is an integer that refers to a particular program line.The second type is a relative GO TO. The form of the relative GO TOstatement is GO TO + N or GO TO - N, where N is an integer. This meansto skip forward or backward N program lines. The third type is a GO TOlabel. This type of GO TO statement takes the form GO TO "LABEL", whereLABEL is any unique alphameric group of characters and must be enclosedin quotes. The number of characters in the label is virtually unlimited,however, the calculator will only look at the last four characters inthe label. When a GO TO "LABEL" statement is executed the program willbranch to a progrm line with "LABEL" as the first statement of thatline, where LABEL has the identical last four characters as the originalGO TO "LABEL" statement. If two lines have the same label branchexecution will always go to the first label.

In a program, a GO TO statement causes program execution to continuewith the line whose number is specified. When a GO TO statement isentered from the keyboard and followed by the RUN PROGRAM key, the GO TOstatement causes program execution to start at the line whose number isspecified. However, when a GO TO statement is entered from the keyboardand followed by the EXECUTE key, the GO TO STATEMENT causes thecalculator to go to the line specified but not to start programexecution. Any subsequent activity then depends upon the next keypressed. A line number is valid only if a current stored program has aline identified by that number, or if it is the next higher number afterthe number identifying the last stored line. All other numbers arenon-valid and, if used in a GO TO statement, will cause diagnostic NOTE08 to be displayed.

JUMP allows relative branching. But, unlike the GO TO, can have anumeric constant, a register or any legitimate calculator expression asa parameter. JUMP-6 on execution would go back six lines in the program.If the contents of A were 6.23 then JUMP A would jump the integer valueof A lines, or in this case 6 lines in the program. If A were 6.23 and Bwere 2, then JMP (A + B) would be acceptable and would jump eight lineson execution.

Often it is desirable to execute the same operations at several placesin a program. One could simply repeat a group of program lines asneeded, but this can be time consuming and error prone. More important,unnecessary repetition of program lines wastes memory space. Thecalculator has the capability to store a set of program lines once, andallow a program to execute this set of lines many times. Such a group ofprogram lines is clled a subroutine.

Once a subroutine has been written and stored in memory, execution maybranch to the subroutine from a program. This is known as calling asubroutine. The program which calls the subroutine is usually referredto as the mainline program or calling program. When the subroutineexecution is completed a branch is made back to the calling program andmainline execution is resumed where it was interrupted by the subroutinecall. The branch from the subroutine to the mainline program is called areturn. Note that if a subroutine is called in line N; the return ismade to line N + 1.

Branching to a subroutine is accomplished by using the GO TO SUB. GO TOSUB works almost exactly like GO TO and may branch to an absolute,relative or "LABEL" address. The difference between GO TO and GO TO SUBis that when a GO TO SUB is used for a branch, the calculator stores theline number for the return branch address. To make the return branchRETURN is stored at the end of the subroutine. The calculator itselfwill provide the address for the return branch.

The IF statement allows the powerful feature of conditional branching inthe calculator enabling the calculator to decide whether or not toexecute the succeeding statement(s) on the same line as that IFstatement. The general form of the IF statement is IF followed by acondition completing the statement. (For Example, IF A-B;). The line inwhich the IF statement appears may be completed with any otherstatements. The operation will be as follows. First the conditionimmediately following the IF will be evaluated to check the truth of thecondition. If the condition is true, the statements following the IFstatement are executed, and if the condition is false, executionimmediately goes to the next line. Thus, in the example given above, A =B is first computed to determine whether the contents of the A registerequal the contents of the B register. If this condition is true, therest of the line would be executed. If it is false, the rest of the linewould be ignored and execution would go immediately to the next line.

The conditions in IF statements all use one of the following keys totest the relationship of any two values, registers, arithmeticexpressions, or flags:

1. > (greater than)

2. ≦ (less than or equal to)

3. = (equal to)

4. ≠ (not equal to)

If the relationship is the same as that indicated by the key used ananswer of true (one) will be given and if not an answer of false (zero)will be given. For example, if the contents of A and B were 2 then

    A = B→C

would store 1 in C,

    A ≠ B→C

would store 0 in C, and

    A + B = A→C

would store 0 in C.

Again, these can be used in any expression A + B (A = B) + AB (A ≦ B) +(A + B + C) (A > B)→ C would store 2 + 2(1) + 4(1) + 6(0) which is 8 inC.

THE STOP AND END STATEMENTS

The STOP key, used as a statement in a program or pressed while aprogram is running, halts program execution. STOP should be used only toabort a program (in the sense that it is no longer desired to run theprogram, or that it is desired to start execution again at thebeginning).

The END key serves the dual purpose of halting program execution and ofinitializing the calculator for commencing program execution at line 0.

THE FLAGS

The calculator makes sixteen flags available to the user as selected bythe FLAG N key followed by numeric keys to designate one of the flags 0through 15. For example, actuation of the FLAG N 4 selects flag 4. Flagsare used generally as part of an IF statement to enable the user todefine some special condition.

The calculator terminology used to describe flags is quite simple: If aflag is raised, it is set; a set flag is considered to have the value 1.If a flag is lowered, it is cleared; a cleared flag is considered tohave the value 0.

Flags are set and cleared by means of the SET/CLEAR FLAG N key. This keyis actuated once to set a flag and twice to clear it. For example, asingle actuation of the SET/CLEAR FLAG N key followed by the 1 and 2number keys sets flag 12. Similarly, a double actuation of the SET/CLEARFLAG N key followed by the 7 key cleared flag 7. Once set, a flagremains set until it is deliberately cleared. However, all flags areautomatically cleared at turn-on, or when ERASE is pressed, or when anEND statement is executed.

As long as no program is being executed, the state of any flag can beexamined actuating the FLAG N key followed by number keys representingthe flag in question followed by the EXECUTE key. The state (value) ofthe flag will then be displayed. Such a test will not change the stateof any flag.

In addition to their normal use, flags 0 and 13 also have a specialpurpose. Flag 0 may be set from the keyboard while a program is actuallyrunning, by pressing the SET/CLEAR FLAG N key. Flag 13 is setautomatically if the program halts for an ENTER statement and the RUNPROGRAM key is then actuated without any data being keyed.

LIST MODE

The LIST key facilitates printing by means of the calculator printingunit a program listing of an internally stored program. The listingincludes the line number of each line together with an alphamericmnemonic representation of the line. An indication of the number ofstorage registers remaining is printed at the end of the listing.

Program listing is accomplished by first setting the program linecounter to the line at which listing is to commence. This may be done byactuating the GO TO key followed by the number keys representing theline number followed by the EXECUTE key. Next, the LIST key is actuatedto begin the listing operation, which will terminate at the last programline stored.

TRACE MODE

A trace mode of the calculator enables the user to obtain a printedrecord of its operation. The form of this printed record is a functionof the type of operation in progress.

The calculator may be placed in the trace mode by actuating the TRACEkey followed by the EXECUTE key or by program execution of a TRACEcommand. The calculator may be returned to normal mode by actuating theNORMAL key followed by the EXECUTE key or by program execution of aNORMAL command. The calculator is automatically placed in the normalmode when it is turned on.

While in the trace mode, the calculator prints a representation of eachline execution from the keyboard and the results of those executedstatements which produce a quantity that is considered a result. A fewkeys, such as CLEAR, are not printed.

The following example is illustative of the printout obtained when thecalculator is operating in the trace mode:

    ______________________________________                                        0→A;0→Bl -                                                                               0.00                                                                          0.00                                                 A + 1→A; B + 10→Bl -                                                                     1.00                                                                          10.00                                                A + 1→A; B + 10→Bl -                                                                     2.00                                                                          20.00                                                PRT "A = ", A, "B = ",                                                        Bl -                                                                          A =                      2.00                                                 B =                      2.00                                                 ______________________________________                                    

While running a program in the trace mode the calculator prints the linenumber of each line as it is executed, and below that, any quantitiesthat were stored into registers by that line. Running a program in thetrace mode may be very helpful in debugging a program by analyzing thenumbers stored during the execution of the program. A program may,without alteration, be run in the trace mode simply by sequentiallyactuating the TRACE and EXECUTE keys before execution of the program isbegun. In addition, the calculator may be placed in the trace modeduring execution of any program which does not contain a NORMALstatement by simply actuating the TRACE key. It is not necessary to haltexecution of the program first.

PLUG-IN READ-ONLY MEMORY MODULES

The calculator's User Definable Functions Accessory includes a 1024-bitplug-in ROM with three 10 key overlays shown in FIGS. 10A-E. Five keysare used for control and twenty-five keys are available for definitionif no other plug-in ROM's are in the machine. Fifteen keys are availableif one other plug-in ROM is used and five are available if both otherROM slots are used. The uses of this accessory are described below.

In a program it frequently happens that some basic calculation is neededat several different places. It is clumsy, wasteful and error prone toduplicate the necessary statements each time they are needed. It iseasier and more desirble to write them once and refer to the statementsas the calculation is required. This capability is provided bysubroutines and functions. Here we describe the basic subroutine andfunction capabilities of the calculator and how they are extended withthe USER DEFINABLE FUNCTIONS accessory.

The calculator has basic subroutine capabilities provided by the GO SUBand RETURN keys. These keys allow one or more lines in the main programto be called as a subroutine by jumping to the first line with the GOSUB statement and returning to the main program by executing a RETURNstatement. For example, it may be necessary to set the first ten Rregister to zeros at several places in the program. This job can beaccomplished with the following program using a subroutine labeled"ZERO" as follows:

    ______________________________________                                        0:   GO SUB "ZERO"                                                                                               Program                                    20:  CO SUB "ZERO"                 with three                                                                    calls to                                                                      "ZERO"                                     35:  CO SUB "ZERO"                                                            40:  "ZERO"                                                                   41:  10 → Z                 Subroutine                                 42:  Z- 1 → Z; O→RX; 1F Z>0; CTO + 0                                                               zero                                       43:  RETURN                                                                   ______________________________________                                    

The calls to "ZERO" from lines 0, 20 and 35 cause the ten R registers tobe cleared before returning to lines 1, 21, and 36, respectively. Theusage of subroutine "ZERO" clearly saves space since the code in lines41 through 43 need not be duplicated. In addition, as the program issegmented ino subroutines it becomes easier to read and understand. Ifthe subroutine is useful to others, it may be incorporated in theirprograms not only to save space but to save time writing their programs.

In the simple example, subroutine "ZERO" always does exactly the samejob: setting the first ten R registers to zero. A more generalsubroutine would have the capability to set any ten consecutive Rregisters to zeros starting at R(J). To accomplish this, the subroutinemust be altered and the value of the parameter J must be known by (orpassed to) the subroutine. This value could be stored in the X registerbefore calling the subroutine and the program could be changed asfollows:

    0: O→X; GO SUB "ZERO 1"

    20: 40.increment.x; go sub "zero 1"

    35: 30→x; go sub "zero 1"

    40: "zero 1"

    41: 10→z

    42: z - 1 → z; 0 → r(x+z), if Z>O; GTO + 0

    43: return

the subroutine "ZERO 1" clears R registers 0-9, 40-49 and 30-39 in lines0, 20 and 35, respectively. The programmer must be careful, however,since the subroutine uses both the X and Z registers. These registersmust be saved if they contain valued information when the subroutine iscalled. This bookkeeping complicates using the subroutine and makes itless attractive and more conductive to errors. The problems become evenworse as more parameters must be passed to the subroutine and as moreworking registers, such as Z, must be made available. These problems arecircumvented by using advanced features found in the USER DEFINABLEFUNCTION ROM.

In addition the USER DEFINABLE ROM includes the concept of a function. Afunction differs from a subroutine in that the name of a function has avalue associated with it. Therefore, function names can appear in anyarithmetic expression to reference the value associated with thefunctions such as the names A, B, C, X, Y, Z, and R are used forregisters. For example,

    SIN, COS, LN and EXP

are functions which have values associated with their names and

    SIN (LN A) - COS (EXP B) → X

is a valid arithmetic statement containing several functions.

While some standard functions are built in to the calculator, it isdesirable to be able to define other functions and have them work in thesame manner that the functions sin, cos, 1n, exp, etc. work. Forexample, if a solution of a problem required hyperbolic functions, itwould be desirable to define the functions and write statements like

    SINH (A + B) - COSH (A -B) → X

the problems encountered in defining functions are similar to those ofwriting subroutines. Parameters of functions (arguments) must be knownby or passed to the function and the working registers must be madeavailable to the function so temporary results may be stored during thecalculations. Defining functions differ from defining subroutines inthat the value must be assigned to the function. The USER DEFINABLEFUNCTION block provides capabilities to solve these problems.

The option block has key arrangements as shown in FIGS. 10A-E. Keys FA,FB, FC, FD and FE are assignable to any five subroutines or functions.GA through GJ and HA through HJ are also assignable in he absence of oneor two other ROM blocks, thus extending the capacity to 15 or 25functions or subroutines. The remaining five keys facilitate definingand calling these functions and subroutines.

Subroutines and functions that are defined with the USER DEFINABLEFUNCTION block are similar in structure to the main program: eachroutine is a list of one or more statements, numbered from zero,followed by an END. To define a simple subroutine to calculate thevolume of a sphere and assign this subroutine to the FA key. First press

    GTO FA EXECUTE

This places the machine in define subroutine mode related to key FA. Anyother assignable key could be used in place of FA. Next, to define thesubroutine for calculating the volume, STORE

    0: 4/3* πzzz→z

    1: end

storing the END returns the machine to the normal mode of operation. Touse this subroutine to calculate the volumeof a sphere with radius 5,press

    5; FA EXECITE

which is equivalent to

    5→Z; GSB FA EXECUTE

The Z register is displayed. To call the subroutine from a program STORE

    3: 5→z; gsb fa

the five control keys (left keys of FIG. 10C) extend these basicsubroutine capabilities to include immediate execute as well asparameter passing and function subprogram. These keys are describedbelow.

CALL. To call a subroutine with parameters the CLL must be used. Thiskey is used to indicate that a list of parameters will follow thesubroutine name. Otherwise, the key is used exactly as GXB key. That is,

     GSB FA   (no parameters)

    CLL FA (A, 5, B+X)   (parameters)

The CLL statement should be the last statement of a line. The parametersneed not be enclosed in parentheses.

PARAMETER. The P() or parameter key is used to access parameters thatare being passed to subroutines and functions and is probably the mostheavily used key of this ROM block. In addition to accessing parameters,the P() key may be used to create and access memory that is usedtemporarily as working registers while the subrooutine is beingexecuted. Accessing parameters and working registers is done with theP() key without affecting the A, B, C, X, Y, Z, or R registers.

The P() key is used exactly like the R() key but it references asequence of parameters registers instead of the R registers. Forexample, if a subroutine FB is called with three parameters, P1references the first parameter, P2 references the second, etc. That is,

    ______________________________________                                                CLL  FB     (A,    5,  X - B)                                                             ↓                                                                             ↓                                                                          ↓                                                           P1     P2  P3                                             ______________________________________                                    

In this CLL, P1 references the A register, P2 and P3 reference memorylocations where 5 and the value of X-B are stored temporarily during theexecution of subroutine FB. The calculation of X-B is made and placed ina temporary location each time the CLL statement is executed beforeexecuting subroutine FB.

Temporary working registers may be created and accessed by using the P()key with subscripts higher in value than the number of parameters beingpassed. For example, subroutine FB had three parameters (P1, P2, P3).P4, P5, etc. could be used as working registers. Obviously, the numberof such registers is limited since the calculator will run out ofinternal temporary storage eventually. An exact limit cannot be givensince it is dependent on the availability of memory when the subroutineis initiated.

As the first example, consider rewriting subroutine "ZERO 1" to zero thespecified ten R registers without destroying the value of the X or Zregisters as the previous routine did. One parameter P1 must be passedreplacing X and one working register P2 is used in place of Z. Thenecessary statements follow.

    ______________________________________                                        PRESS  GTO FA EXECUTE                                                         ______________________________________                                        STORE  0:    "ZERO"                                                                  1:    10 → P2                                                          2:    P2 - 1→P2; 0→R(P1 + P2); IF P2>0; GTO + 0                 3:    END                                                              ______________________________________                                    

Then, CLL of the form

    40→X; GO SUB "ZERO 1"

are replaced pressing

    CLL FA 4 0 STORE

which is displayed as

    20: CLL ZERO 1 40

since the subroutine is started with the label "ZERO 1". The new routineoperates as prescribed without destroying the values of either registerX or Z freeing them for other purposes.

Another example is a routine to increment a register. The one parameterof this subroutine specifies the register to be incremented:

    ______________________________________                                        PRESS           GTO FC EXECUTE                                                ______________________________________                                        STORE           0:    "INCR"                                                                  1:    P1 + 1 . P1                                                             2:    END                                                     ______________________________________                                    

Incr may be called by

    10: CLL INCR A

to increment the A register or

    20: CLL INCR R(A+B)

to increment the R register specified by A+B. This example shows that aparameter may be used to return a result as well as access a value. Anynumber of parameters may be used in calling a subroutine.

DEFINE. A function differs from a subroutine in that it has a valueassociated with its name and, therefore, can be part of an expression.The DEF/→F key allows functions to be defined in the calculator. The keyhas two uses as its label indicates. First, it is used to place themachine in function definition mode DEF. Secondly, once the calculatoris in function definition mode, it is used to assign a value to thefunction →F.

To place the calculator in function definition mode,

    PRESS   DEF FA EXECUTE

This is analogous to placing the machine in subroutine definition mode;that is pressing

    GTO FA EXECUTE.

After placing the machine in function definition mode, the function isdefined exactly as a subroutine with parameters except the →F allows avalue to be assigned to the function.

As an example consider writing a function to define the hyperbolic sinfunction.

    Sinh X  (e.sup.x - e.sup.-x)/2!

as the FD key. First, to place the calculator in function definitionmode,

    PRESS   DEF FD EXECUTE

To define the sinh function,

    ______________________________________                                        STORE        0:    "SINH"                                                                  1:    (EXP P1 - EXP(-P1) )/2→F                                         2:    END                                                        ______________________________________                                    

To use the function, the FD key is referenced just like the SIN key. Forexample,

    PRESS FD (5) + FD (4) EXECUTE

which is displayed as

    SINH (5) + SINH (4)

before EXECUTE is pressed since the definition begins with the label"SINH". Similarly,

    5: SINH (A+B) / SINh (A-B) → A

can be stored as a program line. The machine truly behaves as if it hada "built in" capability to calculate hyperbolic sines.

As a second example, the maximum value function is programmed. Thisfunction has two parameters and is assigned the value of the larger ofthe two parameters. First,

    ______________________________________                                                 PRESS     DEF FE EXECUTE                                             ______________________________________                                        and        STORE       0:    "MAX"                                                                   1:    P1 → F                                                           2:    IF P2>P1; P2→F                                                   3:    END                                              ______________________________________                                    

Notice that P1 is assumed to be the larger of the two parameters in line1, and line 2 makes a correction if this is not the case. This functioncan be used to calculate and store the product of two maximum values asfollows:

    MAX (6, 9) MAX (-5, -4) → RA

or

    MAX (AB - C, 5) MAX (Z↑3, 5-A) → RC

Performing similar operations without using this function capabilitywould require several registers to store intermediate results and wouldbe very hard to read and understand in comparison.

SCRATCH. The SCR is used for several functions. Its primary use is todelete a user defined subroutine or function from memory to allow a keyto be used for other programs or to increase the amount of memoryavailable for the main program. To delete function FA,

    press   scr fa execute

to delete two (or more),

    PRESS   SCR FB, FC EXECUTE

special functions of this key included recording and loading ofprograms. To record all programs in memory in the order stored,

    PRESS   GTO SCR; REC EXECUTE

To load these programs,

    PRESS   GTO SCR; LOD EXECUTE

To record one function or subroutine per one half card, place onesubroutine or function in the machine and

    PRESS   GTO FA (OR OTHER KEY DEFINED); REC EXECUTE

Similarly, to configure a machine from a library created in this manner,order the functions and subroutines and PRESS

    gto fa; lod execute

    gto fb; lod execute

    etc.

to list function FA,

    press   gto fa list

the ability to configure the calculator in this manner makes it possibleto customize the calculator from one problem to the next withoutreprogramming, entering and debugging the functions and subroutinesneeded. This ability combined with the capability of the calculator tomodify the keyboard with a variety of plug-in ROMS allows versatilitynever before found in a calculator.

In summary, the USER DEFINABLE FUNCTIONS ROM for the calculator greatlyextends the capabilities of the calculator. It has been shown how theblock is used to write general purpose subroutines and functions. Theseroutines communicate with the main program by parameter passing andallow working registers within the subroutine to be established andaccessed. These features allow the user to define routines that do notrequire or destroy the content of the A, B, C, X, Y, Z and R registers.Therefore, the programmer is relieved of all the bookkeeping that isassociated with calling a subroutine when parameters must be placed inspecified registers; these registers usually have to be saved beforestoring parameters and restored after calling the subroutine. Theprograms written with this required bookkeeping become clumsy, obscure,hard to debug, and in general discourages the use of subroutines andfunctions.

Another advantage of the USER DEFINABLE FUNCTIONS ROM is its ability todefine functions (subroutines that have a value associated with theirnames such as SIN and LN) that exactly imitate the behavior of the builtin functions of the calculator. This allows the capabilities of themachine to be extended naturally when a problem that is based ondifferent functions is encountered. The option block also allows alibrary of general purpose subroutines and functions to be establishedand used easily. This ability greatly emancipates the programmer byallowing him to borrow something written by another with a minimum ofeffort.

In general, the USER DEFINABLE FUNCTIONS extend the capabilities of thecalculator to make the machine easier and more natural to program. Itmay be the user's most valuable addition to the calculator.

We claim:
 1. An electronic calculator comprising:keyboard input meansfor entering lines of alphameric information, including a line number,into the calculator; memory means, coupled to said keyboard input means,for storing, separately and as part of a mainline program, lines ofalphameric information entered into the calculator from said keyboardinput means; processing means, coupled to said keyboard input means andmemory means, for processing lines of alphameric information enteredinto the calculator to perform selected functions; and output means,coupled to said processing means, for providing an indication of theresult of selected functions performed by said processing means; saidkeyboard input means including one or more definable keys and means fordefining a plurality of functions and subroutines comprising lines ofalphameric information and for storing each such defined function andsubroutine in said memory means in association with selected ones ofsaid definable keys; said memory means including a first section forstoring the lines of alphameric information comprising the definedfunctions and subroutines associated with said definable keys, and asecond section for storing lines of alphameric information comprising amainline program; said processing means including logic means forassigning a sequence of line numbers to the lines of alphamericinformation comprising each of the defined functions and subroutinesstored in the first section of said memory means, each such sequence ofline numbers being independent of the sequence of line numbers of everyother function and subroutine and independent of a sequence of linenumbers associated with the lines of alphameric information stored as amainline program in the second section of said memory means.
 2. Anelectronic calculator as in claim 1 wherein:said keyboard input meansincludes memory erase means for initiating erasure of the lines ofalphameric information stored in the first section of said memory means;and said processing means is responsive to actuation of said memoryerase means for erasing the lines of alphameric information stored inthe first section of said memory means without thereby altering thecontents of the second section of said memory means.
 3. An electroniccalculator as in claim 2 wherein:said memory erase means includes firstand second control keys; and said processing means is responsive tosequential actuation of said first and second control keys together withone or more of said definable keys for erasing the lines of alphamericinformation stored in the first section of said memory means that areassociated with the one or more actuated definable keys without therebyaltering the contents of the second section of said memory means.